using System; using System.Drawing; using System.Windows.Forms; using System.Data; public class WebDwarfTest { public static void Main() { /* create a proxy */ WebDwarf oProxy = new WebDwarf(); /* invoke GetAllDwarves() over SOAP and get the data set */ DataSet oDS = oProxy.GetAllDwarves(); /* create a data grid and connect it to the data set */ DataGrid dg = new DataGrid(); dg.Size = new Size(490,270); dg.DataSource = oDS.Tables[0].DefaultView; /* set the properties of the form and add the data grid */ Form myForm = new Form(); myForm.Text = "Web Dwarf Test"; myForm.Size = new Size(500,300); myForm.Controls.Add(dg); /* display the form */ System.Windows.Forms.Application.Run(myForm); } }